home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
United Public Domain Gold 2
/
United Public Domain Gold 2.iso
/
utilities
/
pu358.dms
/
pu358.adf
/
DonsGenies
/
Don'sGenies
/
ResizeGrid.pprx
< prev
next >
Wrap
Text File
|
1992-07-28
|
836b
|
45 lines
/* This Genie resizes the grid while keeping the same proportions.
Written by Don Cox */
signal on error
signal on syntax
address command
call SafeEndEdit.rexx()
call ppm_AutoUpdate(0)
cr="0a"x
currentunits = ppm_GetUnits()
call ppm_SetUnits(2)
gsize = ppm_GetGridSize()
userinput = ppm_GetUserText(7,"Type percentage of current size")
if userinput = "" then exit_msg()
Xsize = word(gsize,1)
Ysize = word(gsize,2)
userinput = userinput/100
Xsize = Xsize*userinput
Ysize = Ysize*userinput
call ppm_SetGridSize(Xsize,Ysize)
call ppm_SetUnits(currentunits)
call exit_msg()
end
error:
syntax:
do
exit_msg("Genie failed due to error: "errortext(rc))
end
exit_msg:
do
parse arg message
if message ~= "" then
call ppm_Inform(1,message)
call ppm_ClearStatus()
call ppm_AutoUpdate(1)
exit
end